/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-01-13
 * Time:14:14
 */
public class Animal {
    public String name;
    public int age;
//    Animal(String name,int age) {
//        this.name = name;
//        this.age = age;
//    }

//    Animal() {
//        this.name = "Lisi";
//        this.age = 15;
//    }
    public void eat() {
        System.out.println(name+"正在吃饭");
    }

    public void sleep() {
        System.out.println(name+"正在睡觉");
    }

    public void method() {
        System.out.println("这是父类的method方法");
    }

    public Animal func() {
        Dog dog = new Dog();
        return dog;
    }
}
